package com.hlx.entity.admin;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.hlx.vo.TrainNumberVo;
import lombok.Data;

import java.sql.Time;
import java.time.LocalDate;
import java.time.LocalTime;
import java.util.Date;

@Data
public class TrainNumber {
    private Integer id;
    private String trainNumberName;
    private LocalTime startTime;
    private LocalTime endTime;
    private String stationStart;
    private String stationEnd;
    private Integer stationNumber;
    private String trainType;
    private LocalDate startDate;
    private LocalDate endDate;
    private Integer sequence;
//    sequence出京为1，进京为-1

    public void setTrainNumber(TrainNumberVo trainNumber){
        this.trainNumberName = trainNumber.getTrainNumberName();
        this.startTime = trainNumber.getStartTime();
        this.stationStart = trainNumber.getStationStart();
        this.stationEnd = trainNumber.getStationEnd();
        this.stationNumber = trainNumber.getStationNumber();
        this.trainType = trainNumber.getTrainType();
        this.startDate = trainNumber.getStartDate();
        this.sequence = trainNumber.getSequence();

    }
}
